﻿using Sidvall.Collections;
using System.Linq;

namespace Sidvall.LogManager.UI.Entities
{
	public sealed partial class LogScopeItem
	{
		#region Public Members

		#region EventTypeName

		private string _EventTypeName = string.Empty;
		public string EventTypeName
		{
			get
			{
				return _EventTypeName;
			}
			set
			{
				_EventTypeName = value;
				OnPropertyChanged("EventTypeName", true, false);
			}
		}

		#endregion
		#region CategoryNames

		public string CategoryNames
		{
			get
			{
				if (this.LogScopeItemCategories == null)
					return null;
				var names = (from o in this.LogScopeItemCategories
							 select o.Category);
				return names.JoinToString(", ");
			}
		}

		#endregion

		#endregion
	}
}